﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
 
namespace Solidi
{
	public class DependencyRegistration : IDependencyRegistration
	{
		private IDependencyKey _key;
		private IDependencyComposer _composer;
		private IDependencyLifestyle _lifestyle;

		public DependencyRegistration(IDependencyKey key, IDependencyComposer composer)
		{
			_key = key;
			_composer = composer;
			_lifestyle = new PerGraphLifestyle();
		}

		public DependencyRegistration(IDependencyRegistration registration, IDependencyLifestyle lifestyle)
		{
			_key = registration.Key;
			_composer = registration.Composer;
			_lifestyle = lifestyle;
		}

		public DependencyRegistration(IDependencyRegistration registration, IDependencyKey key)
		{
			_key = key;
			_composer = registration.Composer;
			_lifestyle = registration.Lifestyle;
		}

		public DependencyRegistration(IDependencyRegistration registration, IDependencyComposer composer)
		{
			_key = registration.Key;
			_composer = composer;
			_lifestyle = registration.Lifestyle;
		}

		public IDependencyKey Key
		{
			get
			{
				return _key;
			}
		}

		public IDependencyComposer Composer
		{
			get
			{
				return _composer;
			}
		}

		public IDependencyLifestyle Lifestyle
		{
			get
			{
				return _lifestyle;
			}
		}
	}
}
